(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of cons: active, proper, cons
The following defined symbols can occur below the 1th argument of cons: active, proper, cons
The following defined symbols can occur below the 0th argument of top: active, proper, cons
The following defined symbols can occur below the 0th argument of proper: active, proper, cons
The following defined symbols can occur below the 0th argument of active: active, proper, cons

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(length(X)) → length(proper(X))
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

top(ok(X)) → top(active(X))
proper(tt) → ok(tt)
proper(nil) → ok(nil)
take(X1, mark(X2)) → mark(take(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
active(zeros) → mark(cons(0, zeros))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(0) → ok(0)
length(ok(X)) → ok(length(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
top(mark(X)) → top(proper(X))
active(cons(X1, X2)) → cons(active(X1), X2)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))

Rewrite Strategy: INNERMOST

(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 5.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6, 7, 8]
transitions:
ok0(0) → 0
tt0() → 0
nil0() → 0
mark0(0) → 0
zeros0() → 0
00() → 0
top0(0) → 1
proper0(0) → 2
take0(0, 0) → 3
cons0(0, 0) → 4
and0(0, 0) → 5
active0(0) → 6
s0(0) → 7
length0(0) → 8
active1(0) → 9
top1(9) → 1
tt1() → 10
ok1(10) → 2
nil1() → 11
ok1(11) → 2
take1(0, 0) → 12
mark1(12) → 3
zeros1() → 13
ok1(13) → 2
cons1(0, 0) → 14
ok1(14) → 4
and1(0, 0) → 15
mark1(15) → 5
01() → 17
zeros1() → 18
cons1(17, 18) → 16
mark1(16) → 6
and1(0, 0) → 19
ok1(19) → 5
take1(0, 0) → 20
ok1(20) → 3
s1(0) → 21
ok1(21) → 7
s1(0) → 22
mark1(22) → 7
length1(0) → 23
mark1(23) → 8
01() → 24
ok1(24) → 2
length1(0) → 25
ok1(25) → 8
cons1(0, 0) → 26
mark1(26) → 4
proper1(0) → 27
top1(27) → 1
ok1(10) → 27
ok1(11) → 27
mark1(12) → 12
mark1(12) → 20
ok1(13) → 27
ok1(14) → 14
ok1(14) → 26
mark1(15) → 15
mark1(15) → 19
mark1(16) → 9
ok1(19) → 15
ok1(19) → 19
ok1(20) → 12
ok1(20) → 20
ok1(21) → 21
ok1(21) → 22
mark1(22) → 21
mark1(22) → 22
mark1(23) → 23
mark1(23) → 25
ok1(24) → 27
ok1(25) → 23
ok1(25) → 25
mark1(26) → 14
mark1(26) → 26
active2(10) → 28
top2(28) → 1
active2(11) → 28
active2(13) → 28
active2(24) → 28
proper2(16) → 29
top2(29) → 1
02() → 31
zeros2() → 32
cons2(31, 32) → 30
mark2(30) → 28
proper2(17) → 33
proper2(18) → 34
cons2(33, 34) → 29
zeros2() → 35
ok2(35) → 34
02() → 36
ok2(36) → 33
proper3(30) → 37
top3(37) → 1
cons3(36, 35) → 38
ok3(38) → 29
proper3(31) → 39
proper3(32) → 40
cons3(39, 40) → 37
zeros3() → 41
ok3(41) → 40
03() → 42
ok3(42) → 39
active3(38) → 43
top3(43) → 1
cons4(42, 41) → 44
ok4(44) → 37
active4(36) → 45
cons4(45, 35) → 43
active4(44) → 46
top4(46) → 1
active5(42) → 47
cons5(47, 41) → 46

(4) BOUNDS(1, n^1)